home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00328_Script_mappy
< prev
next >
Wrap
Text File
|
1999-03-07
|
4KB
|
137 lines
property Rimage,Dimage,image,sprt, pair
on getPropertyDescriptionList
set description=[:]
-- addProp description,#Rimage,[#default:"",#format:#integer, ¼
-- #comment:"The cast num for rollover image"]
--
-- addProp description,#Dimage,[#default:"",#format:#integer, ¼
-- #comment:"The cast num for the image when the mouse is down"]
--
-- addProp description,#image,[#default:"",#format:#integer, ¼
-- #comment:"The cast num for the image when not rolled over"]
addProp description,#sprt,[#default:"",#format:#integer, ¼
#comment:"The sprite number "]
addProp description,#pair,[#default:"",#format:#integer, ¼
#comment:"The city pair sprite number "]
-- put "*:"&description
return description
end
on get behaviorDescription
return "changes the image on rollover"
end
on mouseEnter me
global gsprt, gpair
if (gsprt <> sprt) and (sprt <> gpair)then
turnred sprt
end if
if pair<>0 then
if (pair <> gpair) and (pair <> gsprt) then
turnred pair
end if
end if
-- set the ink of sprite sprt to 0
updatestage
end
on mouseleave
global gSubch, gpair, gsprt
if (gSubch <> sprt) then
if (gsprt <> sprt) and (gpair <> sprt) then
removered sprt
end if
if pair<>0 then
if (pair <> gpair) and (pair <> gsprt) then
removered pair
end if
end if
--set the ink of sprite sprt to 1
updatestage
end if
end
on removered spritenumber
set xnme = the name of member the castnum of sprite spritenumber
if (xnme contains "red") then
set xmel = length(xnme) - 4
set xout = char 1 to xmel of xnme
set the member of sprite spritenumber = xout
else
puppetsprite spritenumber, false
updatestage
puppetsprite spritenumber, true
end if
end
on turnred spritenumber
set xnme = the name of member the castnum of sprite spritenumber
if (xnme contains "red") or (xnme = "Place_patch") then
puppetsprite spritenumber, false
updatestage
puppetsprite spritenumber, true
else
set xout = xnme & " red"
set the member of sprite spritenumber = xout
end if
end
on chHide spritenum1, spritenum2
global oldname1, oldname2
put "hide:" && spritenum1 && spritenum2
set testname = the name of member the castnum of sprite spritenum1
if testname <> "Place_patch" then set oldname1 = testname
set testname = the name of member the castnum of sprite spritenum2
if testname <> "Place_patch" then set oldname2 = testname
set the member of sprite spritenum1 = "Place_patch"
set the member of sprite spritenum2 = "Place_patch"
end
on chShow spritenum1, spritenum2
global oldname1, oldname2
put "show:" && spritenum1 && spritenum2
set testname = the name of member the castnum of sprite spritenum1
if testname = "Place_patch" then
set the member of sprite spritenum1 = oldname1
end if
set testname = the name of member the castnum of sprite spritenum2
if testname = "Place_patch" then
set the member of sprite spritenum2 = oldname2
end if
end
on mouseup me
global gSubch,gSImage,gMode, gsprt, gpair
-- if gsprt>0 then
-- chShow(gsprt,gpair)
-- end if
-- removered(3)
repeat with slop = 23 to 34
removered(slop)
end repeat
-- set the visible of sprite sprt = false
-- set the visible of sprite pair = false
-- chHide(sprt,pair)
turnred sprt
turnred pair
set gsprt = sprt
set gpair = pair
updatestage
set gMode="menu"
-- if gSub <> sprt and gSub <>"" then
-- set the castnum of sprite gSub to gSImage
-- end if
if gSubch <> sprt then
set gSubch = sprt
-- set gSImage = Image
end if
pass
end